from docx import Document

def read_page(file_path, page_number):
    # 打开Word文档
    doc = Document(file_path)
    print(doc.page_count)

    # 获取指定页的内容
    page = doc.sections[page_number - 1].iter_inner_content()
    for p in page:
        print(p.text)
    print(page)
    return page

# 读取第一页内容
file_path = "word.docx"
page_number = 5
page_content = read_page(file_path, page_number)

print(page_content)